<template>
	<SwitchPatient :fun="swit"></SwitchPatient>
	<view class="choose-box"><text>选择查询报告类型</text></view>
	<view class="choose-detail" @click="checkPathology(v.checkType)" v-for="v in list" :key="v.checkType">
		<text>{{v.name}}</text>
		<view class="iconfont icon-xiangyou1"></view>
	</view>

	<view class="footer">
		<text>
			报告单内容仅供参考，最终结果已医院打印报告为准，最终解释权归本院所有。
		</text>
	</view>
</template>

<script setup>
import SwitchPatient from '@/components/SwitchPatient.vue'
import { reactive,onMounted } from "vue";
import {reportFormStore} from '@/store/reportFormStore.js'

const store=reportFormStore()
let Data=reactive({
	single:[]
})
let list=reactive([
	{name:'病理报告单',checkType:0},
	{name:'检查报告单',checkType:1},
	{name:'检验报告单',checkType:2},
	{name:'体检报告单',checkType:3},
])
let checkPathology = (checkType) => {
	uni.navigateTo({
		url: `/pages/reportSel/reportSel/reportSel?checkType=${checkType}`
	})
}
let swit=(v)=>{
	console.log('v',v)
}
onMounted(()=>{
	const toDate = (t) => {
	                return t.split('/').join('-')
	            } 
	let date=new Date()
	let endTime=toDate(date.toLocaleDateString())
	let startTime=toDate(new Date(date.setFullYear(date.getFullYear()-1)).toLocaleDateString())
	store.Date.push(startTime)
	store.Date.push(endTime)
})
</script>

<style scope lang="less">
.header {
	width: 688rpx;
	height: 178rpx;
	margin: 46rpx 30rpx 0 30rpx;
	background: #f5f8fd;
}
.choose-box,
.choose-detail {
	width: 688rpx;
	height: 118rpx;
	margin: 0 30rpx;
	font-size: 32rpx;
	display: flex;
	align-items: center;
	border-bottom: 1px solid #f8f9fb;
}
.choose-detail {
	color: #909192;
	display: flex;
	justify-content: space-between;
}
.footer {
	width: 672rpx;
	height: 140rpx;
	margin: 24rpx 30rpx;
	background: #f7f7f9;
	border-radius: 15rpx;
	padding: 34rpx 0 24rpx 20rpx;
}
.footer > text {
	font-size: 26rpx;
	color: #acaeaf;
}
</style>
